let t = require;
let e = module;
let o = e.exports;
o.default = e.exports;

('use strict');
console.log('start');
var _n57,
  i =
    (this && this.__extends) ||
    ((_n57 = function n(t, e) {
      return (_n57 =
        Object.setPrototypeOf ||
        ({
          __proto__: []
        } instanceof Array &&
          function (t, e) {
            t.__proto__ = e;
          }) ||
        function (t, e) {
          for (var o in e) {
            Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
          }
        })(t, e);
    }),
    function (t, e) {
      function o() {
        this.constructor = t;
      }
      _n57(t, e),
        (t.prototype =
          null === e
            ? Object.create(e)
            : ((o.prototype = e.prototype), new o()));
    });
Object.defineProperty(o, '__esModule', {
  value: !0
}),
  (o.CardGridItem = void 0);
var r = t('ComUtils'),
  a = t('UIComponent'),
  s = t('ResMrg'),
  c = (function (t) {
    function e(e, o) {
      var n = t.call(this, e) || this;
      return (n.card = o), n;
    }
    return (
      i(e, t),
      (e.prototype.onInit = function () {
        t.prototype.onInit.call(this),
          (this._imgIcon = r.default.getComponent(
            cc.Sprite,
            this.view,
            'imgIcon'
          ));
      }),
      (e.prototype.refresh = function () {
        (this.view.active = null != this.card),
          this.card &&
            s.ResMrg.loadSpriteByAtlas(
              this._imgIcon,
              'Atlas/Battle',
              this.card.icon
            );
      }),
      Object.defineProperty(e.prototype, 'card', {
        get: function get() {
          return this._card;
        },
        set: function set(t) {
          this._card != t && ((this._card = t), this.refresh());
        },
        enumerable: !1,
        configurable: !0
      }),
      e
    );
  })(a.UIComponent);
(o.CardGridItem = c), console.log('end');
module.exports = e.exports;
